package com.elasticsearch.elasticsearch;


import org.springframework.data.elasticsearch.annotations.Document;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

//indexName代表所以名称,type代表表名称

@Document(indexName = "wantu_notice_info", type = "doc")
public class Notice implements Serializable {
	private static final long serialVersionUID = 6320548148250372657L;


	//id
	@JsonProperty("id")
	private Long id;

	//标题
	@Field(type = FieldType.Text, analyzer = "ik_max_word")
	private String title;

	//公告标签
	@Field(type = FieldType.Keyword)
	private String exchangeMc;

	private String createTime;

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	//公告阅读数量
	@Field( type = FieldType.Integer)
	private Integer readCount;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getExchangeMc() {
		return exchangeMc;
	}

	public void setExchangeMc(String exchangeMc) {
		this.exchangeMc = exchangeMc;
	}



	public Integer getReadCount() {
		return readCount;
	}

	public void setReadCount(Integer readCount) {
		this.readCount = readCount;
	}

	public Notice() {
		super();
	}


}